<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>Shallife 集美学和匠心的宴会设计</title>
		<link rel="shortcut icon" type="image/x-icon" href="img/static/shallife.ico" media="screen" />
		<meta name="viewport" content="width=device-width, initial-scale=1,, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<link rel="stylesheet" type="text/css" href="css/swiper-3.4.2.min.css" />
		<link rel="stylesheet" type="text/css" href="css/shallife.css" />
	</head>
	<body>
		<!--总屏幕-->
		<div class="swiper-container" id="fullSwiper">
			<div class="swiper-wrapper">
				<!--首页屏 S-->
				<div class="swiper-slide">
					<div class="header clearfix">
					</div>
					<div class="swiper-container" id="headerSwiper">
						<div class="swiper-wrapper">
						</div>
						<!-- 如果需要导航按钮 -->
						<div class="swiper-button-prev"></div>
						<div class="swiper-button-next"></div>
					</div>
				</div>
				<!--首页屏E-->
				<!--攻略屏S-->
				<div class="swiper-slide">
					<div class="wrap">
						<div class="home-title">
							<img src="img/static/strategy.png" />
						</div>
						<div class="strategy-content clearfix">
							<div class="swiper-container" id="raidersSwiper">
								<div class="swiper-wrapper">
									<div class="swiper-slide">
										<div class="strategy-part">
											<div class="strategy-hover">
												<div class="hover-bg">
													<img src="img/online/str-hover1.png" />
												</div>
												<div class="hover-txt">
													<h2 class="part-hover-tit">求婚/表白</h2>
													<p class="part-hover-con">给彼此一个一生的感动岁月变幻，沧海桑田， 你一直在我心间; 时光翩跹，日子缱绻， 对你的爱从不改变; 真情誓言，一生缠绵， 想你一辈子陪在我身边。</p>
													<a href="" class="part-href">查看攻略</a>
												</div>
											</div>
											<div class="strategy-conmmon">
												<a href="strategy.html"></a>
												<div class="conmmon-txt">
													<h2 class="part-conmmon-tit">求婚/表白</h2>
													<p class="part-conmmon-con">给彼此一个一生的感动岁月变幻，沧海桑田， 你一直在我心间; 时光翩跹，日子缱绻， 对你的爱从不改变; 真情誓言，一生缠绵， 想你一辈子陪在我身边。</p>
												</div>
											</div>
										</div>
									</div>
									<div class="swiper-slide">
										<div class="strategy-part">
											<div class="strategy-hover">
												<div class="hover-bg">
													<img src="img/online/str-hover2.png" />
												</div>
												<div class="hover-txt">
													<h2 class="part-hover-tit">结婚</h2>
													<p class="part-hover-con">岁月变幻，沧海桑田， 你一直在我心间; 时光翩跹，日子缱绻， 对你的爱从不改变; 真情誓言，一生缠绵， 想你一辈子陪在我身边。</p>
													<a href="" class="part-href">查看攻略</a>
												</div>
											</div>
											<div class="strategy-conmmon">
												<a href="strategy.html"></a>
												<div class="conmmon-txt">
													<h2 class="part-conmmon-tit">结婚</h2>
													<p class="part-conmmon-con">岁月变幻，沧海桑田， 你一直在我心间; 时光翩跹，日子缱绻， 对你的爱从不改变; 真情誓言，一生缠绵， 想你一辈子陪在我身边。</p>
												</div>
											</div>
										</div>
	
									</div>
									<div class="swiper-slide">
										<div class="strategy-part">
											<div class="strategy-hover">
												<div class="hover-bg">
													<img src="img/online/str-hover3.png" />
												</div>
												<div class="hover-txt">
													<h2 class="part-hover-tit">生日</h2>
													<p class="part-hover-con">给彼此一个一生的感动岁月变幻，沧海桑田， 你一直在我心间; 时光翩跹，日子缱绻， 对你的爱从不改变; 真情誓言，一生缠绵， 想你一辈子陪在我身边。</p>
													<a href="" class="part-href">查看攻略</a>
												</div>
											</div>
											<div class="strategy-conmmon">
												<a href="strategy.html"></a>
												<div class="conmmon-txt">
													<h2 class="part-conmmon-tit">生日</h2>
													<p class="part-conmmon-con">给彼此一个一生的感动岁月变幻，沧海桑田， 你一直在我心间; 时光翩跹，日子缱绻， 对你的爱从不改变; 真情誓言，一生缠绵， 想你一辈子陪在我身边。</p>
												</div>
											</div>
										</div>
									</div>
									<div class="swiper-slide">
										<div class="strategy-part">
											<div class="strategy-hover">
												<div class="hover-bg">
													<img src="img/online/str-hover1.png" />
												</div>
												<div class="hover-txt">
													<h2 class="part-hover-tit">求婚/表白</h2>
													<p class="part-hover-con">给彼此一个一生的感动岁月变幻，沧海桑田， 你一直在我心间; 时光翩跹，日子缱绻， 对你的爱从不改变; 真情誓言，一生缠绵， 想你一辈子陪在我身边。</p>
													<a href="strategy.html#party" class="part-href">查看攻略</a>
												</div>
											</div>
	
											<div class="strategy-conmmon">
												<a href="strategy.html"></a>
												<div class="conmmon-txt">
													<h2 class="part-conmmon-tit">求婚/表白</h2>
													<p class="part-conmmon-con">给彼此一个一生的感动岁月变幻，沧海桑田， 你一直在我心间; 时光翩跹，日子缱绻， 对你的爱从不改变; 真情誓言，一生缠绵， 想你一辈子陪在我身边。</p>
												</div>
											</div>
										</div>
									</div>
								</div>
								<!-- 如果需要导航按钮 -->
								<div class="swiper-button-prev"></div>
								<div class="swiper-button-next"></div>
							</div>
						</div>
					</div>
				</div>
				<!--攻略屏E-->
				<!--案例S-->
				<div class="swiper-slide">
					<div class="wrap">
					<div class="home-title">
						<img src="img/static/case.png" />
					</div>
					<div class="case-content">
						<div class="case-img">
							<a href="case.html">
								<div class="simg"><img src="img/case/banquet_1.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/banquet_2.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/banquet_3.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/banquet_4.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/banquet_5.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/banquet_6.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/banquet_7.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/banquet_8.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/banquet_9.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/banquet_10.jpg" alt="" /></div>
							</a>
						</div>
						<div class="case-img">
							<a href="case.html">
								<div class="simg"><img src="img/case/birthday_1.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/birthday_2.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/birthday_3.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/birthday_4.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/birthday_5.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/birthday_6.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/birthday_7.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/birthday_8.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/birthday_9.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/birthday_10.jpg" alt="" /></div>
							</a>
						</div>
						<div class="case-img">
							<a href="case.html">
								<div class="simg"><img src="img/case/prorosal_1.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/prorosal_2.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/prorosal_3.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/prorosal_4.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/prorosal_5.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/prorosal_6.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/prorosal_7.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/prorosal_8.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/prorosal_9.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/prorosal_10.jpg" alt="" /></div>
							</a>
						</div>
						<div class="case-img">
							<a href="case.html">
								<div class="simg"><img src="img/case/wedding_1.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/wedding_2.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/wedding_3.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/wedding_4.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/wedding_5.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/wedding_6.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/wedding_7.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/wedding_8.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/wedding_9.jpg" alt="" /></div>
								<div class="simg"><img src="img/case/wedding_10.jpg" alt="" /></div>
							</a>
						</div>
					</div>
					</div>
				</div>
				<!--案例E-->
				<!--我们 S-->
				<div class="swiper-slide" id="footer">
				</div>
				<!--我们 E-->
			</div>
			<div class="swiper-pagination"></div>
		</div>
		<script src="js/jquery-1.9.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/swiper-3.4.2.jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/shallife.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var indexUrl = "/Shallife/index";
			$.ajax({
				type: "post",
				url: serviceIP + indexUrl,
				async: true,
				dataType: 'json',
				success: function(data) {
					console.log(data.result);
					drawCarousel(data.result.carousel);
					drawRaiders(data.result.raiders);
					//drawCases(data.result.cases);
					/*获取屏幕大小*/
					var bodyWidth = $(window).width();
					var slidersNum = bodyWidth < 768 ? 1 : (bodyWidth <= 960 ? 2 : 4);
					/*创建攻略的swiper效果*/
					createCaseSwiper('#raidersSwiper', slidersNum);
				}
			});
			/*渲染轮播*/
			function drawCarousel(carousel) {
				var str = "";
				for(var i = 0; i < carousel.length; i++) {
					str += '<div class="swiper-slide"><img src="' + carousel[i].img + '" /></div>';
				}
				$("#headerSwiper .swiper-wrapper").html(str);
				/*首页轮播设置*/
				HeaderSwiper();
			}
			/*渲染攻略*/
			function drawRaiders(raiders) {
				var str = "";
				for(var i = 0; i < 4; i++) {
					$(".strategy-content .hover-bg img").eq(i).attr("src", raiders[i].pic);
					$(".strategy-hover .part-hover-tit").eq(i).text(raiders[i].section_name);
					$(".strategy-conmmon .part-conmmon-tit").eq(i).text(raiders[i].section_name);
					$(".strategy-hover .part-hover-con").eq(i).html(raiders[i].section_poetry);
					$(".strategy-conmmon .part-conmmon-con").eq(i).html(raiders[i].section_poetry);
					$(".strategy-hover .hover-txt .part-href").eq(i).attr("href", "strategy.html");
					$(".strategy-hover .hover-txt .part-href").eq(i).attr("href", "strategy.html#" + raiders[i].id);
				}
			}
			/*渲染案例界面*/
			function drawCases(cases) {
				for(var i = 0; i < 4; i++) {
					$(".case-content .case-img a").eq(i).attr("href", "case.html");
					$(".case-content .case-img img").eq(i).attr("src", cases[i].img);
				}
			}
			fullSwiper.params.onSlideChangeEnd = function(swiper) {
				if(swiper.activeIndex == 2) {
					$(".case-img").each(function(index) {
						var simg = $(this).find(".simg img");
						for(var i = 0; i < simg.length; i++) {
							$(simg[i]).css({
								"animation": "imgs 0.4s ease-in-out forwards",
								"animation-delay": (index / 5 + (i * 0.04)) + "s"
							});
						}
					})
				}
			}
		</script>
	</body>

</html>